package com.zhi.controller;

import com.zhi.rabbitmq.MQSender;
import com.zhi.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author WenZhi Luo
 * @version 1.0
 * @date 2020/3/14 14:50
 */
@RestController
public class SampleController {

    @Autowired
    private MQSender mqSender;

    /**
     * 测试rabbitmq能否正确运行
     * @return
     */
    @RequestMapping("/mq/header")
    public Result<String> header(){
        mqSender.send("Hello ,Boy");
        return Result.success("....");
    }
}
